import request from '@/utils/request'

// 查询档案柜列表
export function listAmCabinet(query) {
  return request({
    url: '/am/amCabinet/list',
    method: 'get',
    params: query
  })
}

// 查询档案柜详细
export function getAmCabinet(id) {
  return request({
    url: '/am/amCabinet/' + id,
    method: 'get'
  })
}

// 新增档案柜
export function addAmCabinet(data) {
  return request({
    url: '/am/amCabinet',
    method: 'post',
    data: data
  })
}

// 修改档案柜
export function updateAmCabinet(data) {
  return request({
    url: '/am/amCabinet',
    method: 'put',
    data: data
  })
}

// 删除档案柜
export function delAmCabinet(id) {
  return request({
    url: '/am/amCabinet/' + id,
    method: 'delete'
  })
}


// 查询下拉树结构
export function treeselectCabinet() {
    return request({
        url: '/am/amCabinet/treeselect',
        method: 'get'
    })
}
